package com.cmcc.sdtp.util;

import java.util.List;

import org.apache.logging.log4j.util.PropertiesUtil;

import com.cmcc.sdtp.db.SaveSdtpInfo;
import com.cmcc.sdtp.db.SaveSdtpInfo240;
import com.cmcc.xdr.message.SingleSigMsg;
import com.cmcc.xdr.message.SingleSigSipMsg;

/**
 * 简单工厂--用于创建不同类型的SingleSigMsg实例
 * @author cf
 *
 */
public class SDTPFactory {
    public static String XDR_VERSION = SdtpPropertiesUtil.getProperty("xdr.version");

    public static void saveSdtpInfo(List<SingleSigMsg> saveList){
    	 if("220".equals(XDR_VERSION)){
    		 SaveSdtpInfo.save(saveList);
    	 }else{
    		 SaveSdtpInfo240.save(saveList);
    	 }
    }
}